﻿using Application.Allot_dService;
using Application.Allot_hService;
using Application.BusinessTypeService;
using Application.Check_hService;
using Application.CodeRuleService;
using Application.CustomerService;
using Application.DepartmentService;
using Application.DictDataService;
using Application.DictTypeService;
using Application.Instock_dService;
using Application.Instock_hService;
using Application.ISale_hService;
using Application.Outstock_hService;
using Application.PositionService;
using Application.ProductService;
using Application.ProductTypeService;
using Application.PublicFileService;
using Application.Purchase_dService;
using Application.Purchase_hService;
using Application.PurchaseReturn_hService;
using Application.RoleService;
using Application.Sale_dService;
using Application.SaleReturn_hService;
using Application.SlotServic;
using Application.StockService;
using Application.SupplierService;
using Application.UserService;
using Application.WarehouseService;
using AutoMapper;
using Domain.Entity.bs;
using Domain.Entity.ic;
using Domain.Entity.In;
using Domain.Entity.ord;
using Domain.Entity.Out;
using Domain.Entity.sys;
using Domain.Entity.tr;
using Domain.Entity.zct;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.Profiles
{
    public class Profie: Profile
    {
        public Profie()
        {
            //编号规则
            CreateMap<CodeRule, AddCodeRuleDto>().ReverseMap();
            CreateMap<CodeRule, UpdateCodeRuleDto>().ReverseMap();

            //业务类型
            CreateMap<BusinessType, AddBusinessTypeDto>().ReverseMap();
            CreateMap<BusinessType, UpdateBusinessTypeDto>().ReverseMap();

            //字典类型
            CreateMap<DictType, AddDictTypeDto>().ReverseMap();
            CreateMap<DictType, UpdateDictTypeDto>().ReverseMap();

            //字典数据
            CreateMap<DictData, AddDictDataDto>().ReverseMap();
            CreateMap<DictData, UpdateDictDataDto>().ReverseMap();

            //货品类型
            CreateMap<ProductType, AddProductTypeDto>().ReverseMap();
            CreateMap<ProductType, UpdateProductTypeDto>().ReverseMap();

            //仓库
            CreateMap<Warehouse, AddWarehouseDto>().ReverseMap();
            CreateMap<Warehouse, UpdateWarehouseDto>().ReverseMap();

            //库位信息
            CreateMap<Slot, AddSlotDto>().ReverseMap();
            CreateMap<Slot, UpdateSlotDto>().ReverseMap();

            //供应商类型
            CreateMap<Supplier, AddSupplierDto>().ReverseMap();
            CreateMap<Supplier, UpdateSupplierDto>().ReverseMap();

            //客户类型
            CreateMap<Customer, AddCustomerDto>().ReverseMap();
            CreateMap<Customer, UpdateCustomerDto>().ReverseMap();

            //货品信息
            CreateMap<Product, AddProductDto>().ReverseMap();
            CreateMap<Product, UpdateProductDto>().ReverseMap();
            CreateMap<Product, UpdateinventoryDto>().ReverseMap();

            //进货单
            CreateMap<Purchase_h,AddPurchase_hDto>().ReverseMap();
            CreateMap<Purchase_h, UpdatePurchase_hDto>().ReverseMap();
            CreateMap<Purchase_h, UpdatehNum>().ReverseMap();

            //进货明细单
            CreateMap<Purchase_d, AddPurchase_dDto>().ReverseMap();
            CreateMap<Purchase_d, UpdatedNum>().ReverseMap();

            //部门信息
            CreateMap<Department, AddDepartmentDto>().ReverseMap();
            CreateMap<Department, UpdateDepartmentDto>().ReverseMap();

            //销售单
            CreateMap<Sale_h, AddSale_hDto>().ReverseMap();
            CreateMap<Sale_h, UpdateSale_hDto>().ReverseMap();

            //销售明细单据
            CreateMap<Sale_d, AddSale_dDto>().ReverseMap();

            //岗位信息
            CreateMap<Position, AddPositionDto>().ReverseMap();
            CreateMap<Position, UpdatePositionDto>().ReverseMap();

            //用户信息
            CreateMap<User, EditUserDto>().ReverseMap();

            //入库单
            CreateMap<Instock_h, AddInstock_hDto>().ReverseMap();
            CreateMap<Instock_h, UpdateInstock_hDto>().ReverseMap();

            //入库明细单
            CreateMap<Instock_d, AddInstock_dDto>().ReverseMap();

            //库存
            CreateMap<Stock, AddStockDto>().ReverseMap();

            //附件
            CreateMap<PublicFile, AddFileDto>().ReverseMap();

            //角色
            CreateMap<Role, AddRoleDto>().ReverseMap();
            CreateMap<Role, UpdateRoleDto>().ReverseMap();

            //出库单
            CreateMap<Outstock_h, AddOutstock_hDto>().ReverseMap();
            CreateMap<Outstock_h, UpdateOutstock_hDto>().ReverseMap();

            //进货退货单
            CreateMap<PurchaseReturn_h, AddPurchaseReturn_hDto>().ReverseMap();
            CreateMap<PurchaseReturn_h, UpdatePurchaseReturn_hDto>().ReverseMap();

            //销售退货单
            CreateMap<SaleReturn_h, AddSaleReturn_hDto>().ReverseMap();
            CreateMap<SaleReturn_h, UpdateSaleReturn_hDto>().ReverseMap();

            //调拨单(主表)
            CreateMap<Allot_h, AddAllot_hDto>().ReverseMap();
            CreateMap<Allot_h, UpdateAllot_hDto>().ReverseMap();

            //调拨单(从表)
            CreateMap<Allot_d, AddAllot_dDto>().ReverseMap();

            //盘点单
            CreateMap<Check_h, AddCheck_hDto>().ReverseMap();
            CreateMap<Check_h, UpdateCheck_hDto>().ReverseMap();
        }
    }
}
